package com.shaw.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("UserService")
public interface UserService extends RemoteService {
	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	
	Boolean isSaved (UserEntity user);
	UserEntity query(String names);
	
	public static class UtilUser {
		private static UserServiceAsync instance;
		public static UserServiceAsync getInstance(){
			if (instance == null) {
				instance = GWT.create(UserService.class);
			}
			return instance;
		}
	}
}
